package com.mingqijia.gassafety.webserver.response;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;

/**
 * <p>
 *
 * @author wanghai
 * @since 2022-06-09
 */

@Data
@ApiModel(value = "客户列表返回")
public class CustListResponse {
    private Integer id;

    private Integer consumerId;

    private String idStr;

    @ApiModelProperty(value = "spId")
    private String spId;

    @ApiModelProperty(value = "模板一 户号")
    private String subsCode;

    @ApiModelProperty(value = "模板一户名")
    private String custName;

    @ApiModelProperty(value = "模板一户址")
    private String custAddress;

    @ApiModelProperty(value = "模板一 经度/  模板二 经度")
    private Double positionLon;

    @ApiModelProperty(value = "模板一 纬度/  模板二 纬度")
    private Double positionLat;

    @ApiModelProperty(value = "行业类型code")
    private String industryType;
    @ApiModelProperty(value = "行业类型code")
    private String industryTypeName;
    @ApiModelProperty(value = " 模板二 VCC用户ID /  紫荆用户id")
    private String memberId;

    @ApiModelProperty(value = " 模板二 订单姓名")
    private String contactName;

    @ApiModelProperty(value = " 模板二 订单联系电话")
    private String contactPhone;

    @ApiModelProperty(value = " 模板二 工单号")
    private String orderNo;

    @ApiModelProperty(value = " 模板二 安装地址")
    private String installationAddress;

    @ApiModelProperty(value = "报警,true存在报警设备, false没有报警设备")
    private Boolean statusAnyalert;

    @ApiModelProperty(value = "故障,true存在故障设备, false没有故障设备")
    private Boolean statusAnybroken;

    @ApiModelProperty(value = "正常 ,true存在正常设备, false没有正常设备")
    private Boolean statusAnynormal;

    @ApiModelProperty(value = "true存在离线设备, false没有离线设备")
    private Boolean statusAnyoffline;

    private Integer offlineSum = 0;

    @ApiModelProperty(value = "客户类型, 默认0:普通客户,1紫荆客户")
    private Integer consumerType;

    @ApiModelProperty(value = "用户类型")
    private String custType;


    @ApiModelProperty(value = "电话")
    @TableField("Phone")
    private String phone;

    @ApiModelProperty(value = "所属组织")
    private String spName;

    @ApiModelProperty(value = "客户名称")
    private String name;
    @ApiModelProperty(value = "户主手机号")
    private String custPhone;

    @ApiModelProperty(value = "组织编码")
    private String orgCode;

    @ApiModelProperty(value = "燃气公司")
    private String companyName;


    @ApiModelProperty(value = "联系人（级别1）姓名")
    private String contactName1;
    @ApiModelProperty(value = "联系人（级别1）联系方式")
    private String contactPhone1;

    @ApiModelProperty(value = "联系人（级别2）姓名")
    private String contactName2;
    @ApiModelProperty(value = "联系人（级别2）联系方式")
    private String contactPhone2;

    @ApiModelProperty(value = "联系人（级别3）姓名")
    private String contactName3;
    @ApiModelProperty(value = "联系人（级别3）联系方式")
    private String contactPhone3;

    @ApiModelProperty(value = "联系人（级别4）姓名")
    private String contactName4;
    @ApiModelProperty(value = "联系人（级别4）联系方式")
    private String contactPhone4;

    @ApiModelProperty(value = "联系人（级别5）姓名")
    private String contactName5;
    @ApiModelProperty(value = "联系人（级别5）联系方式")
    private String contactPhone5;

    @ApiModelProperty(value = "联系人（级别6）姓名")
    private String contactName6;
    @ApiModelProperty(value = "联系人（级别6）联系方式")
    private String contactPhone6;

    @ApiModelProperty(value = "联系人（级别7）姓名")
    private String contactName7;
    @ApiModelProperty(value = "联系人（级别7）联系方式")
    private String contactPhone7;
    @ApiModelProperty(value = "联系人（级别8）姓名")
    private String contactName8;
    @ApiModelProperty(value = "联系人（级别8）联系方式")
    private String contactPhone8;
    @ApiModelProperty(value = "联系人（级别9）姓名")
    private String contactName9;
    @ApiModelProperty(value = "联系人（级别9）联系方式")
    private String contactPhone9;
    @ApiModelProperty(value = "联系人（级别10）姓名")
    private String contactName10;
    @ApiModelProperty(value = "联系人（级别10）联系方式")
    private String contactPhone10;

    @ApiModelProperty(value = "客户地址")
    private String customerAddress;


    public void setContact(Object c) {
        if (StringUtils.isEmpty(c)) return;
        String[] contacts=(String[])c;
        if (contacts.length <= 0) return;
        this.contactName1 = contacts[0];
        this.contactPhone1 = contacts[1];
        this.contactName2 = contacts[2];
        this.contactPhone2 = contacts[3];
        this.contactName3 = contacts[4];
        this.contactPhone3 = contacts[5];
        this.contactName4 = contacts[6];
        this.contactPhone4 = contacts[7];
        this.contactName5 = contacts[8];
        this.contactPhone5 = contacts[9];
        this.contactName6 = contacts[10];
        this.contactPhone6 = contacts[11];
        this.contactName7 = contacts[12];
        this.contactPhone7 = contacts[13];
        this.contactName8 = contacts[14];
        this.contactPhone8 = contacts[15];
        this.contactName9 = contacts[16];
        this.contactPhone9 = contacts[17];
        this.contactName10 = contacts[18];
        this.contactPhone10 = contacts[19];
    }


}
